package vns.server.domain;

import java.util.Date;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;

import vns.shared.ObjectTypeDatetimeDTO;

public class ObjectTypeDateTime {
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Key id;
	
	@Persistent
	private Date value;
	
	public ObjectTypeDateTime(ObjectTypeDatetimeDTO objectTypeDateTimeDTO){
		this.value=objectTypeDateTimeDTO.getValue();
	}
	
	public void updatefromDTO(ObjectTypeDatetimeDTO objectTypeDateTimeDTO){
		this.value=objectTypeDateTimeDTO.getValue();
	}
	
	public ObjectTypeDatetimeDTO toDTO(){
		ObjectTypeDatetimeDTO otDateTime=new ObjectTypeDatetimeDTO(this.id,this.value);
		return otDateTime;
	}
	
	public Key getId(){
		return id;
	}
	
	public Date getValue(){
		return value;
	}
	
	public void setValue(Date Value){
		this.value=Value;
	}
	
}
